<script setup lang="ts">

import MessagePage from "../MessagePage.vue";

const headerHeight = "30px";

const startIdx = location.search.indexOf("msg=")
let endIdx = location.search.indexOf("&", startIdx)
if (endIdx == -1) {
  endIdx = location.search.length;
}
const optStr = decodeURIComponent(location.search.substring(startIdx + 4, endIdx))
const option = JSON.parse(optStr)
</script>

<template>
  <div class="titlebar" :style="{ height: headerHeight }">
    <div>{{ option.title || '信息' }}</div>
  </div>
  <div class="content-box" :style="{ height: `calc(100% - ${headerHeight})` }">
    <MessagePage :option="option"></MessagePage>
  </div>
</template>

<style scoped lang="less">
</style>
